<?php
require_once("../config.php");
require_once("../model/DB.php");
require_once("../model/Class.php");
	

$classes = Classes::getAllClasses();			
			
?>
<script>
$(document).ready(function(){
	$("#kid_table").tablesorter( 
		{widthFixed: true, widgets: ['zebra']} 
	).tablesorterPager({container: $("#pager")});
});
</script>
<table id="kid_table" class="tablesorter">
	<thead>
		<tr><td>Title</td><td>Grade</td><td>Teacher</td><td>Action</td></tr>
	</thead>
	<tbody>
	
		<?php
		if($classes){
			
			foreach($classes as $class){
				?>
				<tr><td><?php echo $class['title']; ?></td><td><?php echo $class['grade']; ?></td><td><?php echo $class['teacher']; ?></td><td><a href="javascript:void(0)" class="edit" alt="edit" value="" onclick="edit(<?php echo $teacher['id'] ?>)">edit</a> <a href="javascript:void(0)" alt="delete" onclick="del(<?php echo $teacher['id'] ?>)">delete</a></td></tr>
				<?php 
			}
		}
		?>
	</tbody>
</table>
<div id="pager" class="pager" style="width:800px;margin-left:5px;margin-top:15px">
					<form>
						<img class="first" src="../images/first.png"/>
						<img class="prev" src="../images/prev.png"/>
						<input class="pagedisplay" type="text"/>
						<img class="next" src="../images/next.png"/>
						<img class="last" src="../images/last.png"/>
						<select id="pagesize" class="pagesize">
							 <option value="10" >10</option>
							 <option value="15" >15</option>
							
						</select>
					</form>
</div>